<template>
  <div class="first_B">
    <div class="swiper">
      <SwiperKind1 />
      <div class="tubiao iconfont icon-shangjia-">
        <span class="shangjia">附近商家</span>
      </div>
      <div class="shop" v-for="(item, index) in list" :key="index">
      <ShopList :datas="item" />
      </div>
    </div>
  </div>
</template>
<script>
import SwiperKind1 from "../components/compoents_B/SwiperKind1-B"
import ShopList from "../components/compoents_B/ShopList_B"
export default {
  name: "first_B",
  data: function () {
    return {
      list: []
    }
  },
  components: {
    SwiperKind1,
    ShopList
  },
  created () {
    this.$axios.get("api1/shopping/restaurants", {
      params: {
        latitude: 31.38098,
        longitude: 121.50146,
      }
    }).then(res => {
      console.log(res);
      this.list=res;
      //localStorage.setItem("shop", JSON.stringify(this.list))
    }).catch(err => console.log(err))
  }


}

</script>
<style lang="less">
.tubiao {
  width: 100%;
  height: 20%;
  background-color: white;
  font-size: 24px;
  color: #7575;
  margin-top: 10px;
}
.shangjia {
  font-size: 16px;
}
</style>